// 学习元信息
// vue-4.x：
import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: "/hello-axios",
        name: "hello-axios",
        component: () => import("../components/10axios/01hello-axios")
    },
    {
        path: '/:pathMatch(.*)*',
        redirect: '/hello-axios'
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
});

// 导出路由对象
export default router;